home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 8 / Eagles_Nest_Mac_Collection_Disc_8.TOAST / Developer Environments / ProGraph251 / ProGraph v2.5 / Super System Classes I / Hierarchical Menus ƒ / Hier Menu.ReadMe < prev   
Encoding:
Text File  |  1991-10-15  |  3.0 KB  |  73 lines  |  [TEXT/ttxt]

  1. Example:      Hierarchical Menus
  2. Written by:  John Garden, TGS Systems
  3. Contents:     Hier Menu.pgs
  4.                    Hier Menu.ReadMe
  5.  
  6. Needs Prograph Extensions:
  7.                     Math Primitives
  8.                     TGS Primitives #1
  9.                     TGS Primitives #2
  10.                     Basic Toolbox
  11.                     
  12.  
  13. Needs Libraries to Compile:
  14.                     SCLibrary
  15.                     Library
  16.  
  17. Standard Methods That Were Modified:
  18.                    Initial
  19.                    Menu/Quit
  20.                    Application/Update Menus
  21.                    Application/Notify**
  22.  
  23.                 **Only necessary if your Hier Menu has command-key equivalents
  24.  
  25. Description
  26. -----------
  27. Although Prograph's menu editor does not directly support the creation of hierarchical menus, this set of classes and methods makes it easy to add them to your application by following a simple naming convention for the submenu.
  28.  
  29. How To Use In Your Program
  30. --------------------------
  31. The Hier Menu class has been designed for ease of use. There are,
  32. however, a few simple rules to follow when using it.
  33.  
  34. Creating and Editing Hierarchical Menus
  35.  
  36. You can create and edit a hierarchical menu just like any other menu.
  37. Simply be sure that you actually create an instance of Hier Menu
  38. ( conversely, do not use the Hier Menu class for non-hierarchical menus).
  39.  
  40. In order to specify where a hierarchical menu is to appear in your
  41. application, follow this simple convention. The name of your hierarchical
  42. menu should consist of the name of the menu it is to appear in, and the
  43. name of the item it will be attached to, separated by a special separator
  44. character ( '^' by default. you can change this in the Hier Menu class if
  45. necessary ).
  46.  
  47. You should not add your hierarchical menus to the active list. They should
  48. reside only in the Menu Library of your application.
  49.  
  50. Installing your Hierarchical Menus
  51.  
  52. The Init routine does all the installation of your hierarchical menus. It
  53. searches the Menu Lib for all instances of Hier Menu, parses the names to
  54. determine where to install them and does the actual installation. During
  55. the installation process, your hierarchical menus will be added to the
  56. active menu list, and their names will be set to the empty string. You will
  57. notice this if you enter the menu editor while your application is running.
  58. Do not remove hierarchical menus from the active menu list. The Cleanup
  59. routine will do this for you. Because the Prograph interpreter allows you
  60. to switch context during execution, the Update routine is necessary to
  61. ensure that your hierarchical menus are always available. It does not
  62. need to be called in your compiled code. The example shows how to use
  63. the compiled? primitive to call Update when necessary.
  64.  
  65. The Key Method
  66.  
  67. The Human Interface Guidelines recommend that you not put command-key
  68. equivalents on hierarchical menu items. If you wish to do so, however,
  69. you must call the Key method in place of the sc-key-menu primitive. Note,
  70. however, that doing so will disable Prograph's special command key
  71. feature (ie option/shift/control keys in your command keys ) for your
  72. application.
  73.